// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import goods from './components/goods/goods'
import seller from './components/seller/seller'
import ratings from './components/ratings/ratings'

Vue.config.productionTip = false
Vue.use(VueRouter);
Vue.use(VueResource);

/* eslint-disable no-new */
var app = Vue.extend(App);

//定义路由
var routes = [
	{ path: '/', redirect: '/goods' },
	{ path: '/goods', component: goods },
	{ path: '/ratings', component: ratings },
	{ path: '/seller', component: seller }
]

var router = new VueRouter({
	linkActiveClass: 'active',
	routes
});

//=>是ES6的箭头语法
new Vue({
	el: '#app',
	router,
	render: h => h(App)
})